//
//  BCNSpcControlLimit.h
//  Beacon
//
//  Created by arden on 12/8/11.
//  Copyright 2011 Fried Chicken Legs. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface BCNSpcControlLimit : NSObject {
	BCNSpcChartType chartType;
	BCNSpcDataType dataType;
	double mean;
	double sigma;
	double sampleSize;

	double TARGET; // target line
	double UCL;	// upper control limit line
	double LCL;	// lower control limit line
	double UWL;	// upper warning limit line
	double LWL;	// lower warning limit line
	double UOL;	// upper one-sigma limit line
	double LOL;	// lower one-sigma limit line
	
}

 
@property double mean;
@property double sigma;
@property double TARGET;
@property double UCL;
@property double LCL;
@property double UWL;
@property double LWL;
@property double UOL;
@property double LOL; 

// init with trained data ( already have mean and sigma value)
-(void) initWithChartType:(BCNSpcChartType) ctype 
			  AndDataType:(BCNSpcDataType) dtype 
					 Mean:(double) meanValue 
					Sigma:(double) sigmaValue 
					 Size:(double) size;


// init with raw data (training to calculate mean and sigma value)
-(void) initWithChartType:(BCNSpcChartType) ctype 
			  AndDataType:(BCNSpcDataType) dtype 
					 Data:(NSArray*) data 
					 Size:(double) size 
			   Inspection:(BCNSpcScalarInspection) inspection;

-(NSString) GetDescription;

@end
